<!doctype html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta charset="utf-8">
    <title>课程详情</title>
    <tc_include file="Public:head" />
    <link rel="stylesheet" href="__TMPL__Public/invest/css/event details.css">
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>

</head>

<body>
<nav class="navbar navbar-default" role="navigation">
    <tc_include file="Public:nav" /><!-- /.container-fluid -->
</nav>

<div class="header">
    <div class="container header-content">
        <div class="col-md-6 col-sm-6 col-xs-6 header-photo">
            <img src="{:sp_get_image_url($smeta['thumb'])}">
        </div>
        <div class="col-md-6 col-sm-6 col-xs-6 header-xin">
            <h2>{$name}</h2>
            <ul class="header-list">
                <li><i class="glyphicon glyphicon-time"></i>{:date('Y-m-d',$act_start_time)} <b>~</b> {:date('Y-m-d',$act_end_time)}</li>

                <li><i class="glyphicon glyphicon-map-marker"></i>{$address}</li>
                <li><i class="glyphicon glyphicon-user"></i>限额300人</li>
                <li><span class="pull-left"><i class="glyphicon glyphicon-dashboard"></i>截止时间:{:date('Y-m-d',$sig_end_time)}</span>
                    <span class="pull-right header-fen">
                	<!-- JiaThis Button BEGIN -->
                <div class="jiathis_style"><span class="jiathis_txt">分享到：</span>
                <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank"></a>
                </div>
                <script type="text/javascript" >
                var jiathis_config={
                    summary:"",
                    shortUrl:false,
                    hideMore:false
                }
                </script>
                <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js" charset="utf-8"></script>
                        <!-- JiaThis Button END -->
                
                </span>
                </li>
            </ul>
            <div class="clearfix"></div>
            <h3 class="yellow header-xin-h3"><b><span >￥</span>{$shop_price}</b>
                <span class="grey header-x-zi">原价：<e>￥{$market_price}</e></span>
            </h3>
            <p>
                <a href="javascript:void(0)" id="purchase">我要报名</a>

            </p>

        </div>
    </div>

</div>

<div class="content">

    <div id="nav-menu">
        <div class="container">
            <ul class="nav nav-tabs" id="nav">
                <li class="active"><a data-toggle="tab" href="#home">活动内容</a></li>
                <li><a href="#menu1">活动地点</a></li>
            </ul>
        </div>
    </div>
    <div class="container">
        <div class="row c-box">
            {$post_content}
        </div>
        <div id="menu1">
            <h3 class="text-center"><i class="glyphicon glyphicon-map-marker"></i>活动地点</h3>
        </div>

    </div>
</div>
<div class="map" id="map"></div>

<!--第七块footer-->
<div class="clearfix"></div>
<div class="footer">
    <tc_include file="Public:footer" />
</div>


</body>
</html>
<script>var address = '{$address}'</script>
<tc_include file="Public:scripts" />
<script src="__TMPL__Public/invest/js/map.js"></script>
<script>
    Wind.use('validate','artDialog', function () {

        $('#purchase').click(function (event) {
            var id = {$id};
            $.ajax({
                type: "post",
                url: "{:U('Payment/Index/ceorder')}",
                data: {id:id, goods_type: 2},
                dataType: "json",
                success: function (data) {
                    if (data.status) {
                        var order_sn=data.order_sn;//你需要传的值
                        var orderid= parseFloat(order_sn);
                        var url = "{:U('Payment/Index/index',array('snid'=>orderid))}";
                        var urls = url.replace("orderid",orderid);//最后生成URL
                        window.location.href=urls;
                    } else {
                        art.dialog({
                            content: data.info,
                            icon: 'error',
                            ok: function () {
                                window.location.reload();
                                return true;
                            }
                        });
                    }
                },
                error: function (data) {
                    art.dialog({
                        content: "购买失败！",
                        icon: 'error',
                        ok: function () {
                            window.location.reload();
                            return true;
                        }
                    });
                }
            });
        })
    })
</script>